package com.bango.flex{
	
	import com.bango.flex.BangoDatabaseStorage;
	import com.bango.flex.BangoEvent;
	import com.bango.flex.BangoProfile;
	
	public class BangoDatabaseStorageHelper{
		
		public static var _bangoDatabaseStorage:BangoDatabaseStorage;
		
		public static function ProfileId():Number{
			return _bangoDatabaseStorage.getProfileId();
		}
		
		public static function InitDB():void{
			_bangoDatabaseStorage = new BangoDatabaseStorage();
		}
		
		public static function LogProfile(bangoProfile:BangoProfile):void{
			_bangoDatabaseStorage.LogProfile(bangoProfile);
		}
		
		public static function LogEvent(bangoEvent:BangoEvent):Number{
			return _bangoDatabaseStorage.LogEvent(bangoEvent);
		}
		
		public static function UpdateEventsPosted(profileId:Number):void{
			_bangoDatabaseStorage.UpdateEventsPosted(profileId);
		}
		
		public static function UpdateProfileLock(profileId:Number,locked:Boolean):void{
			_bangoDatabaseStorage.UpdateProfileLock(profileId,locked);
		}
		
		public static function DeleteEventsPosted(profileId:Number):void{
			_bangoDatabaseStorage.DeleteEventsPosted(profileId);
		}
		
		public static function GetProfilesForPost(notCurrentProfile:Boolean):Array{
			return _bangoDatabaseStorage.GetProfilesForPost(notCurrentProfile);
		}
		
		public static function GetEventsForPost(profileId:Number):Array{
			return _bangoDatabaseStorage.GetEventsForPost(profileId);
		}
		
		public static function CloseDatabase():void{
			_bangoDatabaseStorage.CloseDatabase();
		}
		
		public static function getPersistDatabaseConnection():Boolean{
			return _bangoDatabaseStorage.getPersistDatabaseConnection();
		}
		
		public static function setPersistDatabaseConnection(persistDatabaseConnection:Boolean):void{
			_bangoDatabaseStorage.setPersistDatabaseConnection(persistDatabaseConnection);
		}
		
		public static function UpdateProfileLocation(locationSource:String, locationLatitude:Number, locationLongitude:Number, locationAltitude:Number,locationAccuracy:Number):void{
			_bangoDatabaseStorage.UpdateProfileLocation(locationSource, locationLatitude, locationLongitude, locationAltitude, locationAccuracy);
		}	

	}
}